package com.memorypalace.knowledge.pojo;

import java.util.HashMap;
import java.util.Map;

public class Node {
	private String id;
	private Integer index;
	private String topic;
	private Boolean isroot;
	private String parentid;
	private Map data = new HashMap<String,Object>();
	public Node() {
	}

	private String direction; //  : enum(left,center,right)   该节点的分布位置
	private Boolean expanded;
	
	private void Node() {}
	
	public Node(String id, Boolean isRoot, String topic, Boolean expanded, String direction) {
		super();
		this.id = id;
		this.isroot = isRoot;
		this.topic = topic;
		this.expanded = expanded;
		this.direction = direction;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTopic() {
		return topic;
	}
	public void setTopic(String topic) {
		this.topic = topic;
	}
	public Boolean getExpanded() {
		return expanded;
	}
	public void setExpanded(Boolean expanded) {
		this.expanded = expanded;
	}
	public String getDirection() {
		return direction;
	}
	public void setDirection(String direction) {
		this.direction = direction;
	}

	public Integer getIndex() {
		return index;
	}

	public void setIndex(Integer index) {
		this.index = index;
	}

	public Boolean getIsroot() {
		return isroot;
	}

	public void setIsroot(Boolean isroot) {
		this.isroot = isroot;
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}


	public Map getData() {
		return data;
	}

	public void setData(Map data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "Node [id=" + id + ", index=" + index + ", topic=" + topic + ", isroot=" + isroot + ", parentid="
				+ parentid + ", data=" + data + ", direction=" + direction + ", expanded=" + expanded + "]";
	}

}
